package com.wade.demo.springbootnutz.domain.entity;

import java.io.Serializable;

import javax.validation.constraints.Size;

import org.nutz.dao.entity.annotation.Column;
import org.nutz.dao.entity.annotation.Table;

import lombok.Data;

/**
 *
 * @company: creekspring
 * @author wdChen
 * @date:2017-09-15 13:56:15
 * @Description:
 */
@Data
@Table("device_down")
public class DeviceDown implements Serializable {
  private static final long serialVersionUID = 1L;

  /**
   * 指令记录表的id
   */
  @Column("batch_id")
  private Integer batchId;

  /**
   * 指令段类型 8-多路开关指令
   */
  @Column("cs_type")
  private Integer csType;

  /**
   * 设备国际移动设备识别码
   */
  @Column("imei")
  @Size(max = 32)
  private String imei;

  @Column("sn")
  private Integer sn;

  /**
   * 指令序列。用来区分短时间内的重复指令
   */
  @Column("seq")
  private Integer seq;

  /**
   * 指令类型
   */
  @Column("msg_type")
  private Integer msgType;

  /**
   * 是否下发成功 0-失败、1-成功
   */
  @Column("state")
  private Integer state;

  /**
   * 简单指令数据列。如开关状态
   */
  @Column("data")
  @Size(max = 2000)
  private String data;

  /**
   * 失败原因
   */
  @Column("fail_reason")
  @Size(max = 16)
  private String failReason;

  /**
   * 创建时间
   */
  @Column("created_at")
  private Long createdAt;

  /**
   * 创建人
   */
  @Column("created_by")
  @Size(max = 32)
  private String createdBy;

  /**
   * 更新时间
   */
  @Column("updated_at")
  private Long updatedAt;

  /**
   * 更新人
   */
  @Column("updated_by")
  @Size(max = 32)
  private String updatedBy;

  /**
   * 删除时间
   */
  @Column("deleted_at")
  private Long deletedAt;

  /**
   * 删除人
   */
  @Column("deleted_by")
  @Size(max = 32)
  private String deletedBy;

  public static class Field {
    public static final String ID = "id";

    public static final String BATCH_ID = "batchId";

    public static final String CS_TYPE = "csType";

    public static final String IMEI = "imei";

    public static final String SN = "sn";

    public static final String SEQ = "seq";

    public static final String MSG_TYPE = "msgType";

    public static final String STATE = "state";

    public static final String DATA = "data";

    public static final String FAIL_REASON = "failReason";

    public static final String CREATED_AT = "createdAt";

    public static final String CREATED_BY = "createdBy";

    public static final String UPDATED_AT = "updatedAt";

    public static final String UPDATED_BY = "updatedBy";

    public static final String DELETED_AT = "deletedAt";

    public static final String DELETED_BY = "deletedBy";

    private Field() {}
  }
}
